-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Propagate auto_id_timestamp in primary-replica resync #33964
Conversation
A follow-up of elastic#33693 to propagate max_seen_auto_id_timestamp in a primary-replica resync.
Pinging @elastic/es-distributed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
for (IndexRequest request : replicationRequests) { | ||
shards.index(request); // deliver via normal replication | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we miss an assertion to check that all shards are identical?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have this check in the teardown but yes, I added an explicit one here :).
@@ -76,7 +76,7 @@ public void testSyncerSendsOffCorrectDocuments() throws Exception { | |||
// Index doc but not advance local checkpoint. | |||
shard.applyIndexOperationOnPrimary(Versions.MATCH_ANY, VersionType.INTERNAL, | |||
SourceToParse.source(shard.shardId().getIndexName(), "_doc", Integer.toString(i), new BytesArray("{}"), XContentType.JSON), | |||
IndexRequest.UNSET_AUTO_GENERATED_TIMESTAMP, false); | |||
randomNonNegativeLong(), randomBoolean()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we randomly want to have normal ops here (i.e. UNSET_AUTO_GENERATED_TIMESTAMP)
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { | ||
maxSeenAutoIdTimestampOnPrimary = in.readZLong(); | ||
} else { | ||
maxSeenAutoIdTimestampOnPrimary = -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use UNSET_AUTO_GENERATED_TIMESTAMP
?
Thanks @bleskes. |
A follow-up of #33693 to propagate max_seen_auto_id_timestamp in a primary-replica resync.
Relates #33693